<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学科信息</title>
    <style>
        #container {
            width: 80%;
            margin: 10px auto;
        }

        #main dt {
            font-size: 1.5em;
        }

        #main dd {
            font-size: 1.2em;
        }

        #main a {
            text-decoration: none;
            color: blue;
        }

        .nav {
            float: right;
            margin-right: 50px;
        }
    </style>
</head>
<body>
<div id="container">
    <div class="nav">
        {% if request.session.userid %}
            {{ request.session.username }}&nbsp;&nbsp;<a href="/logout/">注销</a>
        {% else %}
            <a href="/login/">请登录</a>
        {% endif %}
    </div>
    <h1>千锋教育成都校区所有学科</h1>

    <hr>
    <div id="main">
        {% for subject in subjects %}
            <dl>
                <dt>
                    <a href="/teacher/?s_no={{ subject.no }}">{{ subject.name }}</a>
                    {% if subject.is_hot %}
                        <img src="/static/img/fire.png">
                    {% endif %}
                </dt>
                <dd>
                    {{ subject.intro }}
                </dd>
            </dl>
        {% endfor %}
    </div>
</div>
</body>
</html>